var directives=angular.module('guthub.directives',[]);
directives.directive('butterbar',['$rootScope',function($rootScope){
    return{
        link:function(scope,element,attrs){
            element.addClass('hide');
            console.log(element);
            $rootScope.$on('$routeChangeStart',function(){
                console.log("hide");
                element.removeClass('hide');
            });
            $rootScope.$on('routeChangeSuccess',function(){
                console.log("show");
                element.addClass('hide');
            });
        }
    };
}]);
directives.directive('focus',function(){
    return {
        link:function(scope,element,attrs){
            console.log(element);
            element[0].focus();
        }
    }
})